﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CheckLift.Common.Intf;
using System.Data.Linq;

namespace CheckLift.Linq
{
    public partial class Company : ICompany
    {

        #region ICompany Members

        IAddress ICompany.Address
        {
            get { return (IAddress)Address; }
        }

        EntitySet<ICustomer> ICompany.Customers
        {
            get 
            {
                EntitySet<ICustomer> entitySetRes = new EntitySet<ICustomer>();
                foreach (Customer item in Customers)
                {
                    entitySetRes.Add((ICustomer)item);
                }
                return entitySetRes;                 
            }
        }

        EntitySet<IUser_Company_Link> ICompany.User_Company_Links
        {
            get 
            {
                EntitySet<IUser_Company_Link> user_comp_link = new EntitySet<IUser_Company_Link>();
                foreach (User_Company_Link item in User_Company_Links)
                {
                    user_comp_link.Add((IUser_Company_Link)item);    
                }
                return user_comp_link;
            }
        }

        #endregion
    }
}
